﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebSocketSharp.Server;
using WebSocketSharp;
using Newtonsoft.Json;
using PlaceOrder_Core.Models.QuanYi;
using PlaceOrder_Core.QuanYi;
using log4net;
using Newtonsoft.Json.Linq;
using PlaceOrder_Core.Services.Instances;
using System.Net;

namespace PlaceOrder_Core.Helper
{
    public class OrderServer : WebSocketBehavior
    {
        public  ServerWebSocketHelper _serverWebSocketHelper;
     
        public OrderServer()
        {
       
        }
        protected override void OnOpen()
        {
            base.OnOpen();
            AppLog.WriteInfo("有客户端连接" + ID);
        }

        protected override void OnClose(CloseEventArgs e)
        {
            base.OnOpen();
            AppLog.WriteInfo("客户端连接关闭" + ID);
        }

        protected override void OnMessage(MessageEventArgs e)
        {
            base.OnMessage(e);
            Console.WriteLine("收到客户端消息" + ID + ": " + e.Data);

          
        }

    }
}
